/*
 * @Author:your name
 * @Date:2020-11-08 23:02:06
 * @LastEditTime2020-12-02 22:05:31
 * @LastEditorsPlease set LastEditors
 * @Description:In User Settings Edit
 * @FilePath:\STM32F103_FreeRTOS\User\app\shell\shell_cmd.h
 */ 
#ifndef _SHELL_CMD_H_
#define _SHELL_CMD_H_

#include "common_types.h"

#define SHELL_FIND_HASH                     (FALSE)

#define SHELL_CMD_NUM                       (5)
#define SHELL_CMD_MAX_LENGTH                (20)

typedef void (*shell_cmd_func)(void);

typedef struct shell_cmd_cfg
{
    char *pCmd;
    shell_cmd_func callback;
}shell_cmd_cfg_t;

/* shell command function */
extern void shell_cmd_init(void);
extern shell_cmd_func shell_cmd_find(char *cmd_name, uint16_t cmd_len);
extern boolean shell_cmd_match(char *prefix, uint16_t prefix_len, char **cmd_str);

#endif

